package com.huitone.gddw.service.dto;

import java.util.Date;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.ServiceCodeDef;

/**
 * 短信类型管理 DTO 对象
 * @author wuluodan
 *
 */
public class ServiceCodeDefDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	@ColToProperty
	@TabCol(Index = 2, title = "短信类型编码", width = "80")
	private String serviceCode;

	@ColToProperty
	@TabCol(Index = 3, title = "短信类型名称", width = "90")
    private String serviceName;
	
	
	@ColToProperty
	@TabCol(Index = 6, title = "是否接受上行短信", width = "90")
    private String  acceptMo; //ACCEPT_MO    短信类型是否接受上行短信，0：是，1：否
	
	@ColToProperty
	@TabCol(Index = 5, title = "短信类型说明", width = "150")
    private String desc;
	
    private String status;
    
    @ColToProperty
	@TabCol(Index = 4, title = "状态", width = "")
    private String statusStr;

    private Date insertTime;

    private String insertStaffId;

    private Date lastModTime;

    private String lastModStaffId;

    public ServiceCodeDefDTO() {}
    
    public ServiceCodeDefDTO(ServiceCodeDef entity) {
    	this.setServiceCode(entity.getServiceCode());
    	this.setServiceName(entity.getServiceName());
    	this.setDesc(entity.getDesc());
    	this.setStatus(entity.getStatus());
    	this.setInsertTime(entity.getInsertTime());
    	this.setInsertStaffId(entity.getInsertStaffId());
    	this.setLastModTime(entity.getLastModTime());
    	this.setLastModStaffId(entity.getLastModStaffId());
    	this.setAcceptMo(entity.getAcceptMo()); //ACCEPT_MO    短信类型是否接受上行短信，0：是，1：否
    }
    
    public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}
	
	public String getAcceptMo() {
		return acceptMo;
	}

	public void setAcceptMo(String acceptMo) {
		this.acceptMo = acceptMo;
	}
    
    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode == null ? null : serviceCode.trim();
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName == null ? null : serviceName.trim();
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc == null ? null : desc.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getStatusStr() {
    	if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public String getInsertStaffId() {
        return insertStaffId;
    }

    public void setInsertStaffId(String insertStaffId) {
        this.insertStaffId = insertStaffId == null ? null : insertStaffId.trim();
    }

    public Date getLastModTime() {
        return lastModTime;
    }

    public void setLastModTime(Date lastModTime) {
        this.lastModTime = lastModTime;
    }

    public String getLastModStaffId() {
        return lastModStaffId;
    }

    public void setLastModStaffId(String lastModStaffId) {
        this.lastModStaffId = lastModStaffId == null ? null : lastModStaffId.trim();
    }
	
}
